<?php

/**
 * main actions.
 *
 * @package    dietas
 * @subpackage main
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class mainActions extends sfActions
{
 /**
  * Executes index action
  *
  * @param sfRequest $request A request object
  */
  public function executeIndex(sfWebRequest $request)
  {
    //$this->forward('default', 'module');
  }

	public function executeContacto(sfWebRequest $request){

	}

	public function executeQuienes(sfWebRequest $request){

	}

	public function executeRegistrar(sfWebRequest $request){
		$this->form = new RegistroForm();
		if ($request->isMethod('post')){
			$this->form->bind($request->getParameter('sf_guard_user'));
			if ($this->form->isValid()){
				$this->form->save();
				$this->getUser()->signIn($this->form->getObject());
				$this->redirect('@homepage');
			}
		}
	}
}
